<?php
namespace app\model;
use app\BaseModel;
use think\model\concern\SoftDelete;
use app\model\NewsType;

class HistorySearch extends BaseModel
{

   // use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = '0000-00-00 00:00:00';


    public static function saveData($member_id, $title)
    {
        $history_search = self::where([
            ['member_id', '=', $member_id],
            ['title', '=', $title]
        ])->delete();

        self::create(['member_id' => $member_id, 'title' => $title]);
    }




}